vulkan: Fix invalid read
authorBenjamin Otte <otte@redhat.com>
Sat, 6 Mar 2021 19:43:52 +0000 (20:43 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 9 Mar 2021 16:43:28 +0000 (17:43 +0100)
Look at the right rect to compute circularness

gsk/vulkan/gskvulkanclip.c

index 28efc76702e81f8afead9c02f1ff1a0c55a866ae..d7e05821241015c17bfde351fc502685d19c70ba 100644 (file)
@@ -113,7 +113,7 @@ gsk_vulkan_clip_intersect_rounded_rect (GskVulkanClip        *dest,
     case GSK_VULKAN_CLIP_RECT:
       if (graphene_rect_contains_rect (&src->rect.bounds, &rounded->bounds))
         {
-          dest->type = gsk_rounded_rect_is_circular (&dest->rect) ? GSK_VULKAN_CLIP_ROUNDED_CIRCULAR : GSK_VULKAN_CLIP_ROUNDED;
+          dest->type = gsk_rounded_rect_is_circular (rounded) ? GSK_VULKAN_CLIP_ROUNDED_CIRCULAR : GSK_VULKAN_CLIP_ROUNDED;
           gsk_rounded_rect_init_copy (&dest->rect, rounded);
           return TRUE;
         }